<!-- 1.template -->
<template>
    <div>
        <button @click="fn">点击传值父组件</button>
        <h1>子组件准备传给父组件的数据：{{cmsg}}</h1>
    </div>
</template>
<!-- 2.js -->
<script>
    export default {
        data:function(){
            return {
                cmsg:"1000"
            }
        },
        methods:{
            fn:function(){
                //手动触发自定change事件
                this.$emit("change",this.cmsg);
            }
        }
    }
</script>
<!-- 3.css -->
<style scoped>

</style>
